package com.easyCms.base.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.easyCms.base.common.CodeConst;
import com.easyCms.base.dao.BsNavDAO;
import com.easyCms.base.entity.BsNav;

@Service
public class BsNavSV {
	@Autowired
	private BsNavDAO bsNavDAO;

	/**
	 * 查找配置的左侧导航菜单
	 * 
	 * @return
	 */
	public List<BsNav> findAllValid() {
		return bsNavDAO.findByState(CodeConst.State.STATE_VALID);
	}

	public List<BsNav> findValidParentsNav() {
		return bsNavDAO.findValidParentsNav(CodeConst.State.STATE_VALID);
	}

	public List<BsNav> findChildNav(Long parentNavId) {
		return bsNavDAO.findChildNav(CodeConst.State.STATE_VALID, parentNavId);
	}
}
